package com.spring.sunflower.http;


import com.spring.sunflower.bean.AccountBean;
import com.spring.sunflower.bean.AccountMoneyBean;
import com.spring.sunflower.bean.AnchorDetailBean;
import com.spring.sunflower.bean.AnchorGiftReceivedBean;
import com.spring.sunflower.bean.AuthCodeBean;
import com.spring.sunflower.bean.BalanceBean;
import com.spring.sunflower.bean.BannerBean;
import com.spring.sunflower.bean.BillBean;
import com.spring.sunflower.bean.BillListBean;
import com.spring.sunflower.bean.BlackHasBean;
import com.spring.sunflower.bean.BlackListBean;
import com.spring.sunflower.bean.CallRecordBean;
import com.spring.sunflower.bean.ChatGiftBean;
import com.spring.sunflower.bean.ChatPeopleBean;
import com.spring.sunflower.bean.CheckApplyFaceVerifyBean;
import com.spring.sunflower.bean.CommonBean;
import com.spring.sunflower.bean.FaceAuthStatusBean;
import com.spring.sunflower.bean.FansBean;
import com.spring.sunflower.bean.GiveGiftBean;
import com.spring.sunflower.bean.HelloBean;
import com.spring.sunflower.bean.IncomeChatBean;
import com.spring.sunflower.bean.IncomeGiftBean;
import com.spring.sunflower.bean.IncomeVideoChatBean;
import com.spring.sunflower.bean.LabelBean;
import com.spring.sunflower.bean.LatestVisitorBean;
import com.spring.sunflower.bean.LatestVisitorNumBean;
import com.spring.sunflower.bean.LiveAcceptChatBean;
import com.spring.sunflower.bean.LiveApplyChatBean;
import com.spring.sunflower.bean.LoginByAuthCodeBean;
import com.spring.sunflower.bean.NearbyBean;
import com.spring.sunflower.bean.NewGiftBagBean;
import com.spring.sunflower.bean.NewestBean;
import com.spring.sunflower.bean.PhotoListBean;
import com.spring.sunflower.bean.PhotoListReleaseBean;
import com.spring.sunflower.bean.RecommendAnchorsBean;
import com.spring.sunflower.bean.STSCertBean;
import com.spring.sunflower.bean.SignInBean;
import com.spring.sunflower.bean.TalkRepositoryBean;
import com.spring.sunflower.bean.TaskAwardDailyBean;
import com.spring.sunflower.bean.TaskAwardSignBean;
import com.spring.sunflower.bean.TaskBean;
import com.spring.sunflower.bean.UserAuthBean;
import com.spring.sunflower.bean.UserInfoUpdateBean;
import com.spring.sunflower.bean.VersionBean;
import com.spring.sunflower.bean.VideoCommentBean;
import com.spring.sunflower.bean.VideoCommentReleaseBean;
import com.spring.sunflower.bean.VideoListBean;
import com.spring.sunflower.bean.VideoPlayBean;
import com.spring.sunflower.bean.VideoShowRecommendBean;
import com.spring.sunflower.bean.VideoShowReleaseBean;
import com.spring.sunflower.bean.VideoSubCommentBean;
import com.spring.sunflower.bean.VideoSubCommentReleaseBean;
import com.spring.sunflower.bean.WeChatH5Bean;
import com.spring.sunflower.bean.WeChatH5PayResultBean;
import com.spring.sunflower.bean.WeChatPayBean;
import com.spring.sunflower.bean.WithdrawRecordBean;

import java.util.Map;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by <a href="http://blog.csdn.net/student9128">Kevin</a> on 2021/5/27.
 * <h3>Description:</h3>
 * <div>
 * </div>
 */


public interface HttpInterface {
    /**
     * 获取验证码
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("sms-send")
    Observable<AuthCodeBean> getAuthCode(@FieldMap Map<String, String> map);

    /**
     * 根据验证码登录
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("member/login")
    Observable<LoginByAuthCodeBean> loginByAuthCode(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member/quickLogin")
    Observable<LoginByAuthCodeBean> loginByOneKey(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member/register-personal")
    Observable<LoginByAuthCodeBean> register(@FieldMap Map<String, String> map);

    /**
     * token自动登录
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("member/token-login")
    Observable<LoginByAuthCodeBean> loginByToken(@FieldMap Map<String, String> map);

    @POST("member/deviceRegister")
    Observable<LoginByAuthCodeBean> loginByDevice();

    /**
     * 主播推荐列表
     *
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("anchors/fruitPageQuery")
    Observable<RecommendAnchorsBean> getRecommendAnchorsFruit(@Field("pageIndex") String pageIndex);

    /**
     * 主播推荐列表
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("anchors/page-query")
    Observable<RecommendAnchorsBean> getRecommendAnchors(@FieldMap Map<String, String> map);

    /**
     * 附近的人列表
     *
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("anchors/query-nearby")
    Observable<NearbyBean> getNearby(@Field("pageIndex") int pageIndex);

    @FormUrlEncoded
    @POST("anchors/query-new")
    Observable<NewestBean> getNewest(@Field("pageIndex") int pageIndex);

    /**
     * 获取轮播图
     *
     * @return
     */
    @POST("banner/all")
    Observable<BannerBean> getBanner();

    /**
     * 颜值认证状态
     *
     * @return
     */
    @POST("member/apply-status")
    Observable<FaceAuthStatusBean> getFaceAuthStatus();

    /**
     * 是否可以进行颜值认证
     *
     * @return
     */
    @POST("/member/checkApplyCertified")
    Observable<CheckApplyFaceVerifyBean> getCheckFaceAuthStatus();

    /**
     * 获取形象标签
     *
     * @param type 类别{兴趣爱好 hobbies, 形象标签 visualizeLabel ,通话评价-好评 evaluateLabel ,
     *             通话评价-差评 evaluateLabelBad ,音遇-类别 voiceType,打招呼用语 greeting,
     *             用户昵称男 nicknameWan,用户昵称女 nicknameWomen,婚姻状态 maritalStatus,
     *             住房 housing,收入 income,学历 education,在线心情 onlineMood,职业 occupation,
     *             举报类别 accusationType,语音签名文本信息 voiceSignatureTxtInfo ,个性签名 signature}
     * @return
     */
    @FormUrlEncoded
    @POST("system-dict/type")
    Observable<LabelBean> getLabel(@Field("type") String type);

    /**
     * 查询主播详情
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("member/show-detail")
    Observable<AnchorDetailBean> getAnchorDetail(@FieldMap Map<String, String> map);

    /**
     * 收到的礼物记录
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("/gift-log/page-query/received")
    Observable<AnchorGiftReceivedBean> getGiftLogReceived(@FieldMap Map<String, String> map);

    /**
     * 查询所有礼物列表
     *
     * @return
     */
    @POST("gift/query-all")
    Observable<ChatGiftBean> getAllGift();

    @FormUrlEncoded
    @POST("gift/give")
    Observable<GiveGiftBean> sendGift(@FieldMap Map<String, String> map);

    /**
     * 是否拉黑
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("blacklist/has-black")
    Observable<BlackHasBean> getHasBlacked(@FieldMap Map<String, String> map);

    /**
     * 加入黑名单
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("blacklist")
    Observable<CommonBean> blackAdd(@FieldMap Map<String, String> map);

    /**
     * 移除黑名单
     *
     * @param blackId
     * @return
     */
    @FormUrlEncoded
    @POST("blacklist/remove")
    Observable<CommonBean> blackRemove(@Field("blackId") String blackId);

    @FormUrlEncoded
    @POST("blacklist/page-query")
    Observable<BlackListBean> blackList(@FieldMap Map<String, String> map);

    /**
     * 查询是否关注
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("member-favorite/check")
    Observable<CommonBean> getHasFollowed(@FieldMap Map<String, String> map);

    /**
     * 关注，取消关注 0是取消1是关注
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("member-favorite/set")
    Observable<CommonBean> setFollow(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member-report")
    Observable<CommonBean> report(@FieldMap Map<String, String> map);

    /**
     * 查询主播是否进行了颜值认证
     *
     * @return
     */
    @POST("member/checkApplyCertified")
    Observable<UserAuthBean> checkApplyAuth();

    @FormUrlEncoded
    @POST("member/update")
    Observable<UserInfoUpdateBean> userInfoUpdate(@FieldMap Map<String, String> map);

    @POST("sts-cert")
    Observable<STSCertBean> getSTSCert();

    @FormUrlEncoded
    @POST("member-photo/release")
    Observable<PhotoListReleaseBean> photoRelease(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("/member-photo/page-query")
    Observable<PhotoListBean> photoQuery(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member-photo/delete")
    Observable<CommonBean> photoDelete(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member-video/release")
    Observable<VideoShowReleaseBean> videoRelease(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("/member-video/page-query")
    Observable<VideoListBean> videoQuery(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member-video/delete")
    Observable<CommonBean> videoDelete(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member/onlineMood")
    Observable<CommonBean> setOnlineStatus(@Field("onlineMood") String onlineMoodId);

    @FormUrlEncoded
    @POST("memberFeedback")
    Observable<CommonBean> feedback(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member-favorite/page-query")
    Observable<FansBean> getFansOrFollowed(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/exchange-list")
    Observable<BalanceBean> getBalance(@Field("type") String type);

    /**
     * 充值明细
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("pay-order/page-query")
    Observable<BillListBean> getBillList(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/alipay-generate")
    Observable<CommonBean> generateAliPayOrder(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/alipay-H5")
    Observable<CommonBean> generateAliPayOrderH5(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/alipay-vip-generate")
    Observable<CommonBean> generateAliPayOrderVIP(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/wxPay-generate")
    Observable<CommonBean> generateWXPayOrder(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/wxH5Pay-generate")
    Observable<CommonBean> generateWXPayOrderH5(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/wxPay-vip-generate")
    Observable<CommonBean> generateWXPayOrderVIP(@FieldMap Map<String, String> map);

    /**
     * 清空所有订单
     *
     * @return
     */
    @POST("pay-order/removeAll")
    Observable<CommonBean> removeAllOrder();

    /**
     * 移除单条订单记录
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("pay-order/remove")
    Observable<CommonBean> removeSingleOrder(@Field("id") String id);

    /**
     * 用户申请聊天
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("live/apply-chat")
    Observable<LiveApplyChatBean> liveApplyChat(@FieldMap Map<String, String> map);

    /**
     * 主播申请聊天
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("live/anchor-apply-chat")
    Observable<LiveApplyChatBean> liveApplyChatAnchor(@Field("memberId") String id);

    /**
     * 主播离开房间
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("live/stop-chat-anchor")
    Observable<CommonBean> liveStopChatAnchor(@Field("roomId") String id);

    /**
     * 用户离开房间
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("live/stop-chat-member")
    Observable<CommonBean> liveStopChatMember(@Field("roomId") String id);

    /**
     * 主播保持在线认证
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("live/online-verifyAnchor")
    Observable<CommonBean> liveOnlineVerifyAnchor(@Field("roomId") String id);

    /**
     * 用户保持在线认证
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("live/online-verifyMember")
    Observable<CommonBean> liveOnlineVerifyMember(@Field("roomId") String id);

    /**
     * 接受聊天
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("live/accept-chat")
    Observable<LiveAcceptChatBean> liveAcceptChat(@FieldMap Map<String, String> map);

    /**
     * 用户接受聊天
     *
     * @param id 发起人ID
     * @return
     */
    @FormUrlEncoded
    @POST("member/sking/chat/anchorMemberChat")
    Observable<LiveAcceptChatBean> liveAcceptChatMember(@Field(("anchorId")) String id);

    /**
     * 系统推送的消息打开视频接听页面，不论接听还是挂断都调用此接口
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("live/cancelLoginPopup")
    Observable<CommonBean> liveCallShow(@Field("anchorId") String id);

    /**
     * 主播拒绝视频聊天申请
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("live/cancel-chat-anchor")
    Observable<CommonBean> liveRefuseChatAnchor(@FieldMap Map<String, String> map);

    /**
     * 用户拒绝视频聊天申请
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("member/sking/chat/cancelChatByToMember")
    Observable<CommonBean> liveRefuseChatMember(@Field("anchorId") String id);

    /**
     * 用户取消拨打
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("live/cancel-chat-member")
    Observable<CommonBean> liveCancelDialingMember(@FieldMap Map<String, String> map);

    /**
     * 主播取消拨打
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("member/sking/chat/cancelChatMember")
    Observable<CommonBean> liveCancelDialing(@Field("memberId") String id);

    @POST("im/talkRepository")
    Observable<TalkRepositoryBean> loadTalkRepository();

    @FormUrlEncoded
    @POST("/member/authenticate")
    Observable<BlackHasBean> realAuth(@Field("authPhotoPath") String authPhotoPath, @Field("photoPath") String photoPath);

    @POST("member/apply")
    Observable<BlackHasBean> beautyAuth();

    @POST("member-online/keep")
    Observable<CommonBean> keepOnline();

    @FormUrlEncoded
    @POST("/member-video/page-query")
    Observable<VideoPlayBean> videoList(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("/member-video/recommend")
    Observable<VideoPlayBean> videoListRecommend(@FieldMap Map<String, String> map);

    //访客总数
    @POST("memberVisitLog/visitorStatic")
    Observable<LatestVisitorNumBean> latestVisitorTotal();

    //访客
    @FormUrlEncoded
    @POST("memberVisitLog/pageQuery")
    Observable<LatestVisitorBean> latestVisitor(@FieldMap Map<String, String> map);

    @POST("/member/queryTask")
    Observable<TaskBean> queryTask();

    @POST("/member/signIn")
    Observable<SignInBean> signIn();

    @POST("member/querySignInRecord")
    Observable<SignInBean> querySignInRecord();

    @FormUrlEncoded
    @POST("member/update-location")
    Observable<CommonBean> updateLocation(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/alipay-generate")
    Observable<CommonBean> aliPayGenerate(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/alipay-h5")
    Observable<CommonBean> aliPayH5(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/alipay-vip-generate")
    Observable<CommonBean> aliPayGenerateVip(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/wxPay-generate")
    Observable<WeChatPayBean> weChatPayGenerate(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/wxH5Pay-generate")
    Observable<WeChatPayBean> weChatPayH5(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay-order/wxPay-vip-generate")
    Observable<WeChatPayBean> weChatPayGenerateVip(@FieldMap Map<String, String> map);

    /**
     * 公众号
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("pay-order/wxGzhPay-generate")
    Observable<CommonBean> weChatPayGenerateGongZhongHao(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member/pageQueryTask")
    Observable<TaskAwardDailyBean> awardDaily(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member/pageQuerySignIn")
    Observable<TaskAwardSignBean> awardSign(@Field("pageIndex") String index);

    @FormUrlEncoded
    @POST("im/pageQuery")
    Observable<IncomeChatBean> incomeIMChat(@Field("pageIndex") String index);

    @FormUrlEncoded
    @POST("gift-log/page-query")
    Observable<IncomeGiftBean> incomeGift(@Field("pageIndex") String index);

    @FormUrlEncoded
    @POST("live-room/page-query-consumed")
    Observable<IncomeVideoChatBean> incomeVideoChat(@Field("pageIndex") String index);

    @FormUrlEncoded
    @POST("member/pageQueryBill")
    Observable<BillBean> billDetail(@Field("pageIndex") String index);

    @POST("/member/queryMemberAccount")
    Observable<AccountBean> getAccount();

    @FormUrlEncoded
    @POST("anchor-cash/account-info")
    Observable<AccountMoneyBean> getAccountMoneyInfo(@Field("MID") String userID);

    @FormUrlEncoded
    @POST("anchor-cash/apply")
    Observable<BlackHasBean> getApplyWithdraw(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("anchor-cash/page-query")
    Observable<WithdrawRecordBean> getWithdrawRecord(@FieldMap Map<String, String> map);

    @POST("member/querySayHelloMember")
    Observable<HelloBean> getSayHelloList();

    @FormUrlEncoded
    @POST("member/sayHello")
    Observable<BlackHasBean> sayHello(@Field("anchorIdList") String anchorIdList);

    @FormUrlEncoded
    @POST("member/greeted")
    Observable<BlackHasBean> greeted(@Field("anchorId") String anchorId, @Field("MID") String userId);

    @FormUrlEncoded
    @POST("live-room/page-query")
    Observable<CallRecordBean> getCallRecord(@Field("pageIndex") String pageIndex);

    @POST("member/newcomerGift")
    Observable<NewGiftBagBean> getNewGift();

    @POST("im/queryImRelated")
    Observable<ChatPeopleBean> getChatPeople();

    @FormUrlEncoded
    @POST("member/bind-mobile")
    Observable<BlackHasBean> bindPhone(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("member/fruitBindMobile")
    Observable<BlackHasBean> bindPhone(@Field("mobile") String mobile, @Field("code") String code);

    /**
     * 账号注销
     *
     * @return
     */
    @POST("member/accountDelete")
    Observable<CommonBean> accountOff();

    @Deprecated
    @POST("app/version")
    Observable<VersionBean> getVersion();

    @POST("app/queryCurrentVersion")
    Observable<VersionBean> getCurrentVersion();

    @POST("/app/queryLatestVersion")
    Observable<VersionBean> getLatestVersion();

    /**
     * 微信h5支付获取mWebUrl和订单号
     * 测试环境
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("http://www.wanyuyue.top/pay-order/wxH5Pay-generate")
    Observable<WeChatH5Bean> getWeChatH5Pay(@FieldMap Map<String, String> map);

    /**
     * 生产环境
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("https://app.wanyuyue.cn/pay-order/wxH5Pay-generate")
    Observable<WeChatH5Bean> getWeChatH5PayProduct(@FieldMap Map<String, String> map);

    /**
     * 查询微信H5支付结果
     *
     * @param orderNo
     * @return
     */
    @FormUrlEncoded
    @POST("pay-order/queryOrderInfo")
    Observable<WeChatH5PayResultBean> getWeChatH5PayResult(@Field("orderNo") String orderNo);

    /**
     * 视频秀推荐列表
     *
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("member-video/recommend")
    Observable<VideoShowRecommendBean> getVideoShowRecommend(@Field("pageIndex") String pageIndex);

    /**
     * 视频秀点赞
     *
     * @param likeFlag 1点赞 0取消点赞
     * @param videoId
     * @return
     */
    @FormUrlEncoded
    @POST("member-video/like")
    Observable<CommonBean> getVideoShowLike(@Field("likeFlag") String likeFlag, @Field("videoId") String videoId);

    /**
     * 视频秀评论列表
     *
     * @param pageIndex
     * @param videoId
     * @return
     */
    @FormUrlEncoded
    @POST("member-video/comment/page-query")
    Observable<VideoCommentBean> getCommentList(@Field("pageIndex") String pageIndex, @Field("videoId") String videoId);

    /**
     * 跟评列表
     *
     * @param pageIndex
     * @param rootCommentId
     * @return
     */
    @FormUrlEncoded
    @POST("member-video/comment/sub/page-query")
    Observable<VideoSubCommentBean> getSubCommentList(@Field("pageIndex") String pageIndex, @Field("rootCommentId") String rootCommentId);

    /**
     * 发布评论
     *
     * @param content
     * @param videoId
     * @return
     */
    @FormUrlEncoded
    @POST("member-video/comment/release")
    Observable<VideoCommentReleaseBean> releaseComment(@Field("content") String content, @Field("videoId") String videoId);

    /**
     * 对评论进行跟评
     *
     * @param content
     * @param parentCommentId
     * @return
     */
    @FormUrlEncoded
    @POST("member-video/comment/sub/release")
    Observable<VideoSubCommentReleaseBean> releaseSubComment(@Field("content") String content, @Field("parentCommentId") String parentCommentId);

    /**
     * 短视频评论点赞
     *
     * @param likeFlag
     * @param commentId
     * @return
     */
    @FormUrlEncoded
    @POST("member-video/comment/like")
    Observable<CommonBean> getVideoCommentLike(@Field("likeFlag") String likeFlag, @Field("commentId") String commentId);
}
